package com.zijin.Dao;

import com.zijin.entity.Emp;
import com.zijin.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserMapper {
    @Insert("insert into user(id,name,pwd) values (#{id},#{name},#{pwd})")
    int insertUser(User user);
    @Select("select * from user where name=#{name} and pwd=#{pwd}")
    User selectUser(@Param("name") String name,@Param("pwd") String pwd);
    @Select("select * from user where id=#{id}")
    User selectUserById(@Param("id") int id);
    @Update("update user set pwd=#{pwd} where id=#{id}")
    Integer updateUser(@Param("id") int id,@Param("pwd") String pwd);
}
